cmake_minimum_required(VERSION 3.0)
set (CMAKE_CXX_COMPILER "/usr/local/bin/g++")
add_compile_options(-std=c++20)

include_directories(./include)
file(GLOB_RECURSE SRC_DEPENDENCE ${CMAKE_CURRENT_SOURCE_DIR}/*/*.cc)


project(RouterServer)
add_executable(RouterServer RouterServerMain.cc src/router/RouterServer.cc)
target_link_libraries(RouterServer pthread)

project(RouterClient)
add_executable(RouterClient RouterClientMain.cc ${SRC_DEPENDENCE})
target_link_libraries(RouterClient pthread)

project(RouterControl)
add_executable(RouterControl RouterControlMain.cc src/router/RouterControlClient.cc src/router/RouterRequest.cc)
target_link_libraries(RouterControl pthread)